﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FacebookClient.Database;

namespace FacebookClient
{
    public class Converter
    {
        public static User FacebookUserToDatabaseUser(dynamic fbUser)
        {
            User user = new User();

            user.Id = fbUser.uid;
            user.Name = fbUser.name;
            user.UserName = fbUser.username;
            user.FirstName = fbUser.first_name;
            user.LastName = fbUser.last_name;
            user.Link = fbUser.profile_url;
            user.Gender = fbUser.sex;

            return user;
        }
    }
}
